const baseURL = '/wx'
const http = axios.create({
    baseURL: baseURL,
    withCredentials: true,
    timeout: 1000 * 30,
    headers: {
        'Content-Type': 'application/json; charset=utf-8'
    }
})
/**
 * 响应拦截
 */
const alertCode = ["A0507"]
http.interceptors.response.use(response => {
    if (response.data.code === "200") {
        return response
    }
    if (alertCode.includes(response.data.code)){
        alert(response.data.msg)
    }
    return response
}, error => {
    return Promise.reject(error)
})
